<?php
/**
 * @var $this Extendware_EWCore_Block_Adminhtml_Notification_Toolbar
 */
?>
<?php if ($this->canShow()): ?>
<?php
	$messages = $this->getMessageCollection();
	foreach ($messages as $message) {
		$infoLabel = $message->hasInfoLabel() ? $message->getInfoLabel() : $this->__('Read more');
?>
		<div class="notification-global" id="<?php echo $message->getId(); ?>">
			<?php if ($message->getRight()): ?>
				<span class="f-right"><?php echo $message->getRight(); ?></span>
			<?php endif; ?>
			
			<?php if ($message->hasConfigureUrl() === true): ?>
				<a href="<?php echo $message->getConfigureUrl(); ?>" style="text-decoration: none; font-size: 9px; color: black;">[?]</a>
			<?php endif; ?>
			<?php if ($message->hasInfoUrl() === true): ?>
				<strong class="label clickable" onclick='window.location=<?php echo json_encode($message->getInfoUrl()); ?>'><?php echo $message->getLabel(); ?>: </strong> <?php echo $message->getText(); ?> 
				<a href="<?php echo $message->getInfoUrl(); ?>" onclick="<?php echo $message->getInfoUrlOnClick(); ?>"><?php echo $infoLabel; ?></a>
			<?php else: ?>
				<strong class="label"><?php echo $message->getLabel(); ?>:</strong> <?php echo $message->getText(); ?> 
			<?php endif; ?>
		</div>
		<?php if ($message->getScript()): ?>
			<script><?php echo $message->getScript(); ?></script>
		<?php endif; ?>	
<?php
	}
?>
<?php endif; ?>